<?php
function lilina_user_rss($args)
{
    extract ($args);
    if(!xarSecurityCheck('OverviewLilina')) return;
    xarVarFetch('startnum', 'id', $startnum, '1', XARVAR_NOT_REQUIRED, XARVAR_PREP_FOR_DISPLAY);
    xarVarFetch('catid', 'int', $data['catid'], '', XARVAR_NOT_REQUIRED, XARVAR_PREP_FOR_DISPLAY);
    xarVarFetch('hours', 'int', $hours, 24, XARVAR_NOT_REQUIRED);
   
    $timerange = ($hours ? $hours * 3600 : 3600 * 24);
    $links = xarModAPIFunc('lilina',
                           'user',
                           'getall_stories',
                            array('catid' => $data['catid'],
                                  'startnum' => $startnum,
                                  //'timerange' => $timerange,
                                  'numitems' => xarModGetVar('lilina', 'itemsperpage')));
    for ($i = 0; $i < count($links); $i++) {
        $link = $links[$i];

        
        $links[$i]['link'] = str_replace('&', '&amp;', $link['link']);
        $links[$i]['summary'] = xarModAPIFunc('lilina',
                              'user',
                              'garbage',
                              array('str' => $link['summary']));
        $links[$i]['title'] = xarModAPIFunc('lilina',
                              'user',
                              'garbage',
                              array('str' => $link['title']));
        $links[$i]['link'] = xarModAPIFunc('lilina',
                              'user',
                              'garbage',
                              array('str' => $link['link']));
    }
    $data['items'] = $links;
    return $data;
}
?>